<?php
/**
 * Description of CacheController
 *
 * @author Brian Voss
 */
class CacheController extends Zend_Controller_Action {

    protected $cache;
    protected $index;

    public function init()
    {
	$this->cache = Zend_Registry::get('cache_manager')->getCache('default');
	if ( !$this->index = $this->cache->load('current_index'))
	{
	    $this->index = 10;
	    $result = $this->cache->save(10,'current_index');
	}
    }

    public function indexAction()
    {
	$idx = $this->index;
	$result = $this->cache->save($idx + 1, 'current_index');
	//$be = $this->cache->getBackend();
	//$fill = $be->getFillingPercentage();
	//var_dump($fill);die();
	//var_dump($result);die();
	echo $idx;die();
    }

}
?>
